﻿using System;
//using Microsoft.VisualStudio.TestTools.UnitTesting;
using NUnit.Framework;
using System.Web.Mvc;
using Sprint1.Controllers;
using System.Web.WebPages;
using Sprint1.Models;
using System.Collections.Generic;
namespace Sprint1.Tests
{
    [TestFixture]
    public class UnitTest1
    {   
        [Test]
        public void findCourse()
        {
            StudentController c = new StudentController();
            var result = c.FindCourse("concepts") as ViewResult;
            var model=result.Model as IList<Course>;
            Assert.IsNotNull(model, "Model should have been type of IList<Course>");
        }
        [Test]
public void AboutOverride()
{
testController controller = new testController();
controller.About();
var result = controller.About() as ViewResult;

Assert.AreEqual("Index", result.ViewName,"Should have redirected to Index");
}
    }
}
